package com.neuedu.yunong.service.impl;
import lombok.RequiredArgsConstructor;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.neuedu.yunong.mapper.YunongLandLeaseMapper;
import com.neuedu.yunong.domain.YunongLandLease;
import com.neuedu.yunong.service.IYunongLandLeaseService;

/**
 * 招商引资Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-12
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class YunongLandLeaseServiceImpl extends ServiceImpl<YunongLandLeaseMapper, YunongLandLease> implements IYunongLandLeaseService
{
    private final YunongLandLeaseMapper yunongLandLeaseMapper;

    /**
     * 查询招商引资
     *
     * @param id 招商引资主键
     * @return 招商引资
     */
    @Override
    public YunongLandLease selectYunongLandLeaseById(Long id)
    {
        return yunongLandLeaseMapper.selectYunongLandLeaseById(id);
    }

    /**
     * 查询招商引资列表
     *
     * @param yunongLandLease 招商引资
     * @return 招商引资
     */
    @Override
    public List<YunongLandLease> selectYunongLandLeaseList(YunongLandLease yunongLandLease)
    {

        List<YunongLandLease> results = yunongLandLeaseMapper.selectYunongLandLeaseList(yunongLandLease);
        for (YunongLandLease lease : results) {
            System.out.println("Usage: " + lease.getUsage());
        }

//        return yunongLandLeaseMapper.selectYunongLandLeaseList(yunongLandLease);
        return results;
    }

    /**
     * 新增招商引资
     *
     * @param yunongLandLease 招商引资
     * @return 结果
     */
    @Override
    public int insertYunongLandLease(YunongLandLease yunongLandLease)
    {
        return yunongLandLeaseMapper.insertYunongLandLease(yunongLandLease);
    }

    /**
     * 修改招商引资
     *
     * @param yunongLandLease 招商引资
     * @return 结果
     */
    @Override
    public int updateYunongLandLease(YunongLandLease yunongLandLease)
    {
        return yunongLandLeaseMapper.updateYunongLandLease(yunongLandLease);
    }

    /**
     * 批量删除招商引资
     *
     * @param ids 需要删除的招商引资主键
     * @return 结果
     */
    @Override
    public int deleteYunongLandLeaseByIds(Long[] ids)
    {
        return yunongLandLeaseMapper.deleteYunongLandLeaseByIds(ids);
    }

    /**
     * 删除招商引资信息
     *
     * @param id 招商引资主键
     * @return 结果
     */
    @Override
    public int deleteYunongLandLeaseById(Long id)
    {
        return yunongLandLeaseMapper.deleteYunongLandLeaseById(id);
    }
}
